<template>
    <div class="xsqg">
        <span class="posi iconfont icon-chevron-thin-left" @click="prev()"></span>
        <div class="head">
            <span class="bir"><img src="https://static.shengri.cn/uploads/web/logo-with-word.png" alt=""></span>   |   <router-link to="/city"><span>{{this.$route.params.city}}</span><i class="iconfont icon-chevron-thin-down"></i></router-link>
        </div>
        <van-sticky>
            <ul>
                <li><router-link to="/xsqga"><div><p>距离结束</p><span class="time"><van-count-down :time="time" /></span></div></router-link></li>
                <li><router-link to="/xsqgb"><div><p>17:00</p><span>即将开始</span></div></router-link></li>
            </ul>
        </van-sticky>
        <router-view></router-view>
    </div>
</template>

<script>
export default {
     data() {
        return {
            time: 30 * 60 * 60 * 1000,
        };
    },
    methods:{
        prev(){
            this.$router.push("/Home")
        }
    },
    mounted(){
        console.log(this.$route.params.city)
    }
}
</script>

<style scoped>
    .xsqg{
        font-size: 0.12rem;
        position: relative;
        text-align: center;
    }
    .posi{
        position: absolute;
        left: 0.05rem;
        top: 0.15rem;
        font-size: 0.2rem;
        color: red;
    }
    .head{
        width: 100%;
        line-height: 0.5rem;
        text-align: left;
        font-size: 0.16rem;
        background-image: url("https://static.shengri.cn/uploads/web/geo-bar-bg.jpg");
        background-size: 100% 100%;
        background-position: center center;
        background-repeat: no-repeat;
        text-indent: 0.1rem;
    }
    .head img{
        height: 0.5rem;
        vertical-align: middle;
        margin-left: 0.2rem;
    }
    .time{
        line-height: 0;
    }
    .bir{
        font-weight: bolder;
        color: red;
    }
    .bir img{
        width: 20%;
        height: auto;
    }
    ul{
        height: 0.54rem;
        width: 100%;
        background: #3a3a3a;
        display: flex;
        justify-content: space-around;
    }
    ul p{
        line-height: 0.2rem;
    }
    li{
        height: 100%;
    }
    li div{
        color: #ddd;
        height: 100%;
    }
    li div p{
        line-height: 0.2rem;
    }
    li div a{
        display: inline-block;
    }
    .router-link-exact-active{
        display: block;
        background-color: red;
        color: white;
        padding: 0.05rem 0.2rem;
    }
</style>